<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>:focus 伪类选择器</title>
    <style>
         input:focus{
             /*背景*/
             background-color: violet;
             color: red;
         }
    </style>
</head>
<body>

<input type="text">
<input type="text">
<input type="text">
</body>
</html>